package com.kevin.utilits.curator.treecache;

import org.apache.log4j.Logger;

import com.kevin.utilits.zookeeper.CuratorUtils;

public class TreeListener {
	public static final String NAMESPACE = "TreeListenerTest";
	public static final String CHARSET = "UTF-8";
	private static Logger logger = Logger.getLogger(TreeListener.class);

	public static void main(String[] args) {
		try {
			CuratorUtils.init("10.198.195.147:2181", 1000, 3, 1000, NAMESPACE);
			CuratorUtils.persist("/TEST1", "TEST3");
			CuratorUtils.persist("/TEST1", "TEST5");
			CuratorUtils.update("/TEST1", "TEST6");
			CuratorUtils.remove("/TEST1");
			CuratorUtils.close();
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
		}
	}
}